package xyh

import (
	"time"

	gocache "github.com/patrickmn/go-cache"
)

var (
	Conf  *Config
	cache *gocache.Cache
)

// 初始配置
func Init(config *Config) {
	Conf = config
	if Conf == nil {
		Conf = &Config{}
	}
	if Conf.BaseURL == "" {
		Conf.BaseURL = "https://open.api.xiaoyuanhao.com"
	}

	cache = gocache.New(7100*time.Second, 7200*time.Second)
}
